package com.heima.apis.user;

import com.heima.apis.user.fallback.IChannelClientFallback;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "leadnews-user",fallback = IChannelClientFallback.class)
public interface IChannelClient {
    
    /**
     * 同步自媒体频道到用户端
     * @param wmChannelId 自媒体频道ID
     * @param wmChannelName 自媒体频道名称
     * @param isDefault 是否默认频道
     * @param status 是否启用
     * @return 同步结果
     */
    @PostMapping("/api/v1/channel/sync")
    ResponseResult syncChannel(@RequestParam("wmChannelId") Integer wmChannelId,
                              @RequestParam("wmChannelName") String wmChannelName,
                              @RequestParam("isDefault") Boolean isDefault,
                              @RequestParam("status") Boolean status);
}
